package com.yangguo.code.generator.controller;

import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSON;


@RestController
public class DataUploadController {
	
	 /**
     * 构建消息监听器
     * 
     * @param request 请求参数
     * @param bindingResult 绑定验证结果
     * @return
     */
    @PostMapping(value = "/haidian/api/v1/parklot")
    public Object parklot(@Validated @RequestBody String  request) {
    	String json = "{\"rtn\":\"0\",\"status\":\"成功\"}";
        return 	JSON.parseObject(json);
    }
    
    
	 /**
     * 构建消息监听器
     * 
     * @param request 请求参数
     * @param bindingResult 绑定验证结果
     * @return
     */
    @PostMapping(value = "/haidian/api/v1/vehicle")
    public Object createAndStart(@Validated @RequestBody String  request) {
    	String json = "{\"rtn\":\"0\",\"status\":\"成功\"}";
        return 	JSON.parseObject(json);
    }
    
    


}
